<% link = @document.direct_link.nil? ? @document.permalink : @document.direct_link %>

<h1>OER Recommender - <%= l(:related_resources_title) %></h1>

<% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>

<%= render(:partial => "search/search_box") %>

<p><b><%= link_to @document_title, link %></b> <% if !@document.direct_link.nil? %> - <%= link_to l(:metadata), @document.permalink, :class => "catalog_link" %><% end %></p>
<hr class="divider" />

<p><b><%= l(:related_resources_title) %></b> <span style="font-size:85%">(<%= l(:calculated) %> <%= @document.relevance_calculated_at.strftime("%d %b %Y") %>)</span> - <%= link_to l(:details), "?details=true", :class=> "catalog_link" %></p> 

<div id="results">
<%= render(:partial => "result", :collection => @document.ranked_recommendations(@limit, params[:order] || "mixed", true)) %>
</div>

</body>
</html>
